import request from '@/utils/myAioxs'


//培训班|详细信息
export function getTrainingDetail(id) {
  return request({
    url: `/tc/v1/detail/${id}`,
    method: 'get',
  })
}
export function getTrainingSchedule(id) {
  return request({
    url: `/tc-user/v1/query-user-schedule/${id}`,
    method: 'get',
  })
}
//专题页面详情课程列表
export function getSpecialCourseList(data) {
  return request({
    url: `/index/v1/special-subjects-detail-course`,
    method: 'post',
    data
  })
}
//专题页面详情课程信息
export function getSpecialCourseDetail(id) {
  return request({
    url: `/index/v1/special-subjects-detail/${id}`,
    method: 'get',
  })
}

//培训班全部课程
export function getTrainingAllCourseList1(data) {
  return request({
    url: `/tc/v1/all-course-list`,
    method: 'post',
    data
  })
}
export function getTrainingAllCourseList2(data) {
  return request({
    url: `/tc/v2/all-course-list`,
    method: 'post',
    data
  })
}
export function getTrainingUserCourseList(data) {
  return request({
    url: `/tc/v1/user-course-list`,
    method: 'post',
    data
  })
}
//培训班配置的调查问卷列表
export function getQuestionnaire(data) {
  return request({
    url: `/tc/v1/questionnaire-list/`,
    method: 'post',
    data
  })
}
//培训班配置的考试列表
export function getExam(data) {
  return request({
    url: `/tc/v1/exam-list/`,
    method: 'post',
    data
  })
}
//培训班配置的练习列表
export function getPractice(data) {
  return request({
    url: `/tc/v1/query-tc-practice`,
    method: 'post',
    data
  })
}
//培训班配置的资料列表
export function getMaterial(data) {
  return request({
    url: `/tc/v1/query-tc-material`,
    method: 'post',
    data
  })
}
//获取课程课件列表
export function getCoursewareList(data) {
  return request({
    url: `/course/v1/formal-courseware-list`,
    method: 'post',
    data
  })
}
export function saveMaterial(data) {
  return request({
    url: `/tc/v1/save-material-record`,
    method: 'post',
    data
  })
}


export function dropUserCourse(data) {
  return request({
    url: `/tc-user/v1/user-drop-tc-course`,
    method: 'post',
    data
  })
}
export function queryCoursewareLearn(data) {
  return request({
    url: `/tc-user/v1/query-user-courseware-learn`,
    method: 'post',
    data
  })
}

//获取作业须知
export function getTaskNotice(id) {
  return request({
    url: `/tc/v1/query-tc-task-notice/${id}`,
    method: 'get',
  })
}
//新增作业
export function addTask(data) {
  return request({
    url: `/tc/v1/add-tc-task`,
    method: 'post',
    data
  })
}
//修改作业
export function editTask(data) {
  return request({
    url: `/tc/v1/update-tc-task`,
    method: 'post',
    data
  })
}
//删除作业
export function deleteTask(id) {
  return request({
    url: `/tc/v1/delete-tc-task/${id}`,
    method: 'get',
  })
}

//获取作业记录
export function queryTask(data) {
  return request({
    url: `/tc/v1/query-tc-task`,
    method: 'post',
    data
  })
}
//获取作业详情
export function queryTaskDetail(id) {
  return request({
    url: `/tc/v1/query-tc-task-detail/${id}`,
    method: 'get',
  })
}


//获取折算学时
export function queryConvertcolumn(id) {
  return request({
    url: `/convert-credit-column/v1/list/${id}`,
    method: 'post',
  })
}
export function queryConvertList(id) {
  return request({
    url: `/tc-user/v1/convert-credit-record/list/${id}`,
    method: 'post',
  })
}
export function getConvertDetail(id) {
  return request({
    url: `/convert-credit-record/v1/select-record/${id}`,
    method: 'post',
  })
}
//删除折算学时
export function deleteConvertcolumn(id) {
  return request({
    url: `/convert-credit-record/v1/delete-record/${id}`,
    method: 'post',
  })
}
//修改折算学时
export function saveConvertcolumn(data) {
  return request({
    url: `/convert-credit-record/v1/save-record`,
    method: 'post',
    data
  })
}
export function editConvertcolumn(data) {
  return request({
    url: `/convert-credit-record/v1/edit-record`,
    method: 'post',
    data
  })
}
//上传折算学时图片
export function uploadConvertcolumn(data) {
  return request({
    url:'/convert-credit-resource/v1/upload-prove',
    method: 'post',
    data,
    headers: { "Content-Type": "multipart/form-data" },
  })
}

export function addConvertRecord(data) {
  return request({
    url: `/convert-credit-record/v1/add-record`,
    method: 'post',
    data
  })
}
export function updateConvertRecord(data) {
  return request({
    url: `/convert-credit-record/v1/update-record`,
    method: 'post',
    data
  })
}


export function getCertificateInfo(tcId) {
  return request({
    url: `/tc-user/v1/query-user-tc-info/${tcId}`,
    method: 'post',
  })
}

//查询培训班课程考试
export function queryCourseExam(data) {
  return request({
    url: `/tc/v1/query-tc-course-exam`,
    method: 'post',
    data
  })
}

//培训班个人证书申请

export function applyUserCert(tcid) {
  return request({
    url: `/tc-user/v1/apply-cert/${tcid}`,
    method: 'get',
  })
}

export function applyCertRecord(tcid) {
  return request({
    url: `/tc-user/v1/apply-cert-record/${tcid}`,
    method: 'get',
  })
}
